/* -*- c++ -*- */
/*
 * This file is part of the SD Project.
 *
 * Authors: Cleiber Marques da Silva <cleiber@lisha.ufsc.br>
 * 			Odilson Tadeu Valle <odilson@sj.ifsc.edu.br>
 * 
 * SD Project is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; version 2 of the License.
 */

#ifndef _DELIVERY_H_
#define _DELIVERY_H_

#include <queue>
#include <vector>
#include <omnithread.h>

#include "listener.hh"
#include "window.h"

typedef std::queue<struct_message*> buffer;

namespace sd {
	class delivery
	{
		public:
			sd::window *window;
			std::vector<struct_message> casual;
			std::vector<buffer> messages;
			omni_mutex mutex;
			delivery(int size, sd::window *_window);
			~delivery(){}
			int should_send();
			void window_show();
	};

}
#endif /* _DELIVERY_H_ */
